<?php

if (null === $this->container) {
    $this->container = $this->breadcrumbs()->getContainer();
}

// find deepest active
if (!$active = $this->breadcrumbs()->findActive($this->container)) {
    return '';
}

$active = $active['page'];

// put the deepest active page last in breadcrumbs
if ($this->breadcrumbs()->getLinkLast()) {
    $html = ' <li>' . $this->breadcrumbs()->htmlify($active) . '</li>' . PHP_EOL;exit;
} else {
    $html = $active->getLabel();
    if ($this->breadcrumbs()->getUseTranslator() && $t = $this->breadcrumbs()->getTranslator()) {
        $html = $t->translate($html);
    }
    $html = ' <li>' . $this->escape($html) . '</li>' . PHP_EOL;
}

// walk back to root
while (($parent = $active->getParent()) != null) {
    if ($parent instanceof Zend_Navigation_Page) {
        // prepend crumb to html
        $html = ' <li>' . $this->breadcrumbs()->htmlify($parent) . '</li>' . PHP_EOL . $html;
    }

    if ($parent === $this->container) {
        // at the root of the given container append Home
        $html = '<li><a href="/">Home</a></li>'. PHP_EOL . $html;
        break;
    }

    $active = $parent;
}
echo strlen($html) ? $this->breadcrumbs()->getIndent() . '<div class="panel panel-default"><ol class="breadcrumb"><span> You are in :  </span>' . PHP_EOL 
                 . $html .  '</ol></div>' . PHP_EOL : '';
?>